package com.wash.shoes.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author ljg
 * @since 2024-12-01
 */
@ApiModel(value = "优惠卷")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("os_coupon")
public class CouponPo extends Model<CouponPo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "优惠卷的主键")
    private String id;

    @ApiModelProperty(value = "优惠卷类型；0-> 新人卷；1->满减券；2->补偿券")
    private Integer type;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "金额")
    private Double amount;

    @ApiModelProperty(value = "每人限领张数0无限制")
    private Integer perLimit;

    @ApiModelProperty(value = "满减的限制 0无限制")
    private Double fullMoney;

    @ApiModelProperty(value = "开始使用时间")
    private String startTime;

    @ApiModelProperty(value = "结束使用时间")
    private String endTime;

    @ApiModelProperty(value = "使用类型：0->全场通用；1->指定分类；2->指定商品")
    private Integer useType;

    @ApiModelProperty(value = "发行数量0 表示无限制")
    private Integer publishCount;

    @ApiModelProperty(value = "已使用数量")
    private Integer useCount;

    @ApiModelProperty(value = "领取数量")
    private Integer receiveCount;

    @ApiModelProperty(value = "状态0删除  1上架  2下架 ")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "扩展字段")
    private String extendInfo;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建者")
    private String createBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @TableField(value = "poid", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "门店id")
    private String poId;
}
